<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
 * $Id: constants.php 169 2011-10-30 04:00:43Z alpha1130@gmail.com $
 */

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							'rb');
define('FOPEN_READ_WRITE',						'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					'ab');
define('FOPEN_READ_WRITE_CREATE',				'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');


/*
|--------------------------------------------------------------------------
| OA MISC
|--------------------------------------------------------------------------
|
| These constants be used to set OA misc constants
|
*/

class OA_CONST_MISC
{
}


/*
|--------------------------------------------------------------------------
| CATAGORY ID
|--------------------------------------------------------------------------
|
| These ID be used to set controller/class constant CATAGORY
|
*/

class OA_CONST_CATAGORY
{
    const COMMON = 1;
    const TEACHING = 2;
    const MARKETING = 3;

    const PERMISSION = 100;
}


/*
|--------------------------------------------------------------------------
| class function constant 
|--------------------------------------------------------------------------
|
| These constants be used for controller/class 
|
*/
class OA_CONST_CLASS_FUNC
{
    const METHOD_BOTH = 0;
    const METHOD_POST = 1;
    const METHOD_GET = 2;

    const STATUS_DELETE = -1;
    const STATUS_NORMAL = 0;
}


/*
|--------------------------------------------------------------------------
| user constant 
|--------------------------------------------------------------------------
|
| These constants be used for user 
|
*/
class OA_CONST_USER
{
    const STATUS_NORMAL = 0;
    const STATUS_DELETE = -1;
    const STATUS_FREEZE = -2;

    const GENDER_MALE = 1;
    const GENDER_FAMALE = 2;
    static $GENDER = array(
        SELF::GENDER_MALE => '男',
        SELF::GENDER_FAMALE => '女',
    );
}


/*
|--------------------------------------------------------------------------
| teacher constant 
|--------------------------------------------------------------------------
|
| These constants be used for teacher 
|
*/
class OA_CONST_TEACHER
{
    const DISCIPLINE_CHINESE = 1;
    const DISCIPLINE_MATH = 2;
    const DISCIPLINE_HISTORY = 3;
    const DISCIPLINE_ENGLISH = 4;
    static $DISCIPLINE = array(
        SELF::DISCIPLINE_CHINESE => '语文',
        SELF::DISCIPLINE_MATH => '数学',
        SELF::DISCIPLINE_HISTORY => '历史',
        SELF::DISCIPLINE_ENGLISH => '英语',
    );

    const CLASS_ARTS = 1;
    const CLASS_SCIENCE = 2; 
    const CLASS_ALL = 3;
    static $CLASS_TYPE = array(
        SELF::CLASS_ARTS => '文科',
        SELF::CLASS_SCIENCE => '理科',
        SELF::CLASS_ALL => '综合',
    );
}


/*
|--------------------------------------------------------------------------
| message constant 
|--------------------------------------------------------------------------
|
| These constants be used for message 
|
*/
class OA_CONST_MESSAGE
{
    const STATUS_INIT = 0;
    const STATUS_DONE = 1;
    const STATUS_ERROR = 2;
}


/*
|--------------------------------------------------------------------------
| project constant 
|--------------------------------------------------------------------------
|
| These constants be used for project 
|
*/
class OA_CONST_PROJECT
{
	const FLAG_NORMAL = 0;
	const FLAG_DELETE = -1;
}


/*
|--------------------------------------------------------------------------
| member constant 
|--------------------------------------------------------------------------
|
| These constants be used for member 
|
*/
class OA_CONST_MEMBER
{
	const STATUS_FULL_TIME = 0;
	const STATUS_PART_TIME = 1;
	const STATUS_FREEZE = 2;
	static $STATUS = array('全职', '兼职', '冻结');
}


/*
|--------------------------------------------------------------------------
| school constant 
|--------------------------------------------------------------------------
|
| These constants be used for school 
|
*/
class OA_CONST_SCHOOL
{
	const FLAG_NORMAL = 0;
	const FLAG_DELETE = -1;
}


/*
|--------------------------------------------------------------------------
| feedback constant 
|--------------------------------------------------------------------------
|
| These constants be used for feedback 
|
*/
class OA_CONST_FEEDBACK
{
	const ENTER_NO_TRY = 0;
	const ENTER_SUCCESS = 1;
	const ENTER_FAILURE = 2;
	static $ENTER = array('-', '是', '否');
}


/* End of file constants.php */
/* Location: ./application/config/constants.php */
